<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录界面</title>
    <!-- 引入vue   -->
    <script type="text/javascript" src="../js/vue.js"></script>
    <!--    引入element UI 组件库-->
    <script type="text/javascript" src="../js/index.js"></script>
    <link rel="stylesheet" href="../css/index.css">
    <!--引入axios库 -->
    <script type="text/javascript" src="../js/axios.min.js"></script>

</head>
<body>
<div id="app">
    <div style="margin: 100px auto;width: 400px">
        <el-form  class="demo-form-inline">
            <el-form-item label="账号:">
                <el-input v-model="username" placeholder="账号:"></el-input>
            </el-form-item>
            <el-form-item label="密码:">
                <el-input  v-model="password" placeholder="账号:"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="submit">查询</el-button>
            </el-form-item>
        </el-form>
    </div>
</div>
<script>
    let app = new Vue({
        el: '#app',
        data() {
            return {
                username: '',
                password: ''
            }
        },
        methods: {
            submit() {
                axios
                    .get("/login?username="+this.username+"&password="+this.password)
                    .then(res => {
                        console.log("res => ",res)
                    })
            }
        },
    })
</script>
</body>
</html>